package edu.usm.predatorwars;

import java.util.List;
import java.util.Set;

import edu.predatorwars.shared.models.Board;
import edu.predatorwars.shared.models.Creature;
import edu.predatorwars.shared.models.Move;
import edu.predatorwars.shared.models.Player;

/**
 * Implementation of the Playable interface that will handle 
 * filtering of of certain information before it is passed to the client
 */
class PlayableFilter implements Playable {
	
	private final Playable proxyFor;

	PlayableFilter(Playable proxyFor) {
		this.proxyFor = proxyFor;
	}

	public void onBoardUpdate(Board board, List<Player> playerList, int myX, int myY) {
		proxyFor.onBoardUpdate(board, playerList, myX, myY);
	}

	public Move onMove(Set<Move> availableMovements, int myX, int myY) {
		return proxyFor.onMove(availableMovements, myX, myY);
	}

	public Creature onSelectCreature(List<Creature> creatures) {
		return proxyFor.onSelectCreature(creatures);
	}

	public void onGameEndState(List<Player> players) {
		proxyFor.onGameEndState(players);
	}

	public void onGameLoadingState(List<Player> players) {
		proxyFor.onGameLoadingState(players);
	}

	public void onGameStartState(List<Player> players) {
		proxyFor.onGameStartState(players);
	}
}
